package org.example;

public class MigrationException extends Exception {
    private final ExceptionType type;
    private final String details;

    public MigrationException(ExceptionType type, String message) {
        this(type, message, null);
    }

    public MigrationException(ExceptionType type, String message, String details) {
        super(message);
        this.type = type;
        this.details = details;
    }

    public ExceptionType getType() {
        return type;
    }

    public String getDetails() {
        return details;
    }

    public enum ExceptionType {
        FILE_READ_ERROR,
        DATABASE_CONNECTION_ERROR,
        DATA_CONVERSION_ERROR,
        MAPPING_CONFIGURATION_ERROR,
        BATCH_INSERT_ERROR
    }
}